import random
import readJSON
import pyautogui
import pyperclip
import time
import random

data = readJSON.readJson("祖安话合集.json")


# 随机调用各data中的句子
def randomSentence(content):
    while True:
        random.shuffle(content)
        for j in content:
            yield j


if __name__ == "__main__":
    while True:
        pyautogui.press('enter')
        pyperclip.copy(next(randomSentence(data['sentence'])))
        pyautogui.hotkey('ctrl', 'v')
        pyautogui.press('enter')
        time.sleep(random.uniform(1, 4))

